package com.leo.train.business.controller.web;

import com.leo.train.business.entity.DailyTrain;
import com.leo.train.business.service.DailyTrainService;
import com.leo.train.common.resp.CommonResp;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/daily-train")
@Slf4j
public class DailyTrainController {
    @Autowired
    private DailyTrainService dailyTrainService;

    /**
     * 查询车次编码所有列表
     */
    @GetMapping("/listAll")
    public CommonResp<List<DailyTrain>> listAll() {
        return new CommonResp<>(dailyTrainService.listAll());
    }


}
